package com.cloud.lesson.service;

import com.cloud.lesson.enity.CommonResult;
import com.cloud.lesson.enity.Payment;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: Mr.Lai
 * @createTime: 2021/01/08
 * @classNote:
 **/
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
@RequestMapping("/payment")
public interface PaymentFeignService {

    // int create(Payment payment);

    // CommonResult<Payment> getPaymentById(@Param("id") Long id);

    @GetMapping(value = "/read/{id}")
    public CommonResult<Payment> read(@PathVariable("id") Long id);

    @GetMapping(value = "/feign/timeout")
    public String paymentFeignTimeOut();
}
